package com.agile.major.repository;

import com.agile.major.domain.MajorCoursePlan;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;


/**
 * Spring Data JPA repository for the MajorCoursePlan entity.
 */
@SuppressWarnings("unused")
@Repository
public interface MajorCoursePlanRepository extends JpaRepository<MajorCoursePlan, Long> {
    @Query("select  a from MajorCoursePlan a where (a.courseName like CONCAT('%',?1,'%') or a.courseCode like CONCAT('%',?1,'%')) order by a.courseName")
    Page<MajorCoursePlan> findMajorCoursePlanLike(String keyword, Pageable pageable);
}
